/**
 * Created by licc on 29/09/2020.
 */
import { VuexModule, Module, Mutation, Action, getModule } from 'vuex-module-decorators'
import { commonAction } from '@/utils/common'
import store from '@/store'
export interface TemplateState {
  templateData: any
}

@Module({ dynamic: true, name: 'template', store, namespaced: false })
class Template extends VuexModule implements TemplateState {
  public templateData = {}
  @Action
  public async TemplateCommonAction (params: object) {
    return commonAction(params).then(resp => {
      return resp
    })
  }

  @Mutation
  private SET_TEMPLATE (data: any) {
    // this.templateData = data
  }
}

export const TemplateModule = getModule(Template)
